home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / DATABASE / SUPER_M2.ZIP;1 / SCIENCE.EXE / HELP7.PRN < prev    next >
Encoding:
Text File  |  1988-06-12  |  10.6 KB  |  311 lines

  1.  4.3 REGRESSION CURVE FITTING
  2.  
  3.  
  4.  Using this feature the user can fit an analytic function to a data. 
  5.  The program allows four types of functions:
  6.  
  7.  1. Polynomial  : 1st to the 8th order polynom (A+B*X+C*X^2+.....
  8.                   ..+H*X^8). The data should be in the form of two
  9.                   columns, the first column is the dependent variable 
  10.                   and the second is the independent variable.
  11.  2. Log/power   : Product of powers (8 max) (A*B^X*C^Y*.....*H^U), the
  12.                   data can be in the form of 2 to 8 columns. The first
  13.                   column is the independent variable.
  14.  3. Exponent    : A*EXP(X), and the data should be in the form of two
  15.                   columns, the first column is the dependent variable 
  16.                   and second is the independent variable.
  17.  4. Multi_linear: Linear function of 8 variables maximum,
  18.                   (A+B*Y+C*Y+.......+H*U) the data can be in the form 
  19.                   of 2 to 8 columns. The first column is the dependent 
  20.                   variable.
  21.  
  22.  
  23.  Where:
  24.  
  25.  A,B,C...H - Coefficients to be found
  26.  X,Y,....U - Independent variables
  27.  
  28.  
  29.  4.3A <C>urve_fit
  30.  
  31.  
  32.  Choose the <C>urve_fit menu item to get the next menu:
  33.  
  34.  Import Poly. Log/power Exp. Multi_linear Data_save Graph_save Help
  35.  
  36.  
  37.  4.3B <I>mport
  38.  
  39.  
  40.  Choose the <I>mport menu item to get the next prompt:
  41.  
  42.  Input the file name - ISRA6
  43.  
  44.  Type the file name and press ENTER to view the next screen :
  45.  
  46. ____________________________________________________________________________
  47.  
  48.  Import Poly. Log/power Exp. Multi_linear Data_save Graph_save  Help
  49.  Import data file (list) of numbers               [ESC] - Previous menu
  50.              A           B           C           D           E
  51.  1 ====================================================================
  52.  2          Units        |     Output/Input      |        Memory      |
  53.  3 ====================================================================
  54.  4   None                |                  0.00 |                0.00|
  55.  5 ====================================================================
  56.           GA            GB            GC            GD            GE
  57.  3        8.154845             1
  58.  4        22.16716             2
  59.  5        60.25661             3
  60.  6        163.7944             4
  61.  7        445.2394             5
  62.  8        1210.286             6
  63.  9        3289.899             7
  64.  10       8942.873             8
  65.  11       24309.25             9
  66.  12       66079.39            10
  67.  13
  68.  14
  69.  15
  70.  16
  71. ____________________________________________________________________________
  72.  
  73.  
  74.  NOTE: The imported data file represents an exponent function.
  75.  
  76.  
  77.  4.3C <P>olynomial
  78.  
  79.  
  80.  Press <p> to get the next prompt:
  81.  
  82.  Polynom order (8 max) - 3
  83.  
  84.  The user can choose 1st to 8th order polynom.
  85.  
  86.  In this example we will try to fit a 3rd order polynom to the data.
  87.  The program will display the regression curve fitting graphs (the data
  88.  and the fitted curve (see POLYNOM3.PIC). If you print this graph using 
  89.  Lotus PRINTGRAPH you will find that we need to use higher order
  90.  polynom.
  91.  
  92.  Type 3 and press ENTER to view the graph.
  93.  
  94.  Press [ESC] to see the next screen:
  95.  
  96. ____________________________________________________________________________
  97.  
  98.  Import Poly. Log/power Exp. Multi_linear Data_save Graph_save  Help
  99.  Import data file (list) of numbers               [ESC] - Previous menu
  100.              A           B           C           D           E
  101.  1 ====================================================================
  102.  2          Units        |     Output/Input      |        Memory      |
  103.  3 ====================================================================
  104.  4   None                |                  0.00 |                0.00|
  105.  5 ====================================================================
  106.         FQ       FR       FS       FT       FU       FV       FW
  107.  3            Regression Output:
  108.  4   Constant                   -15553.4
  109.  5   Std Err of Y Est           4428.812
  110.  6   R Squared                  0.970260
  111.  7   No. of Observations              10
  112.  8   Degrees of Freedom                6
  113.  9
  114.  10  X Coefficient(s)
  115.  11
  116.  12  17328.98 -4880.03 391.9952
  117.  13
  118.  14  Std Err of Coef.
  119.  15
  120.  16  6442.657 1328.901 79.68790
  121. ____________________________________________________________________________
  122.  
  123.  
  124.  This is the standard Lotus regression output table.
  125.  
  126.  The fitted curve can be expressed analytically as:
  127.  
  128.  Y = -15553.4 +17328.98*X -4880.03*X^2 + 391.9952*X^3
  129.  
  130.  
  131.  4.3D <L>og/power
  132.  
  133.  
  134.  This option enables the use of a product of powers
  135.  
  136.               x   y     u
  137.  like:   A * B * C ... G
  138.  
  139.  as the fitted function.
  140.  
  141.  Where x,y and u are to be determined and A,B,C and G are known. The
  142.  maximum number of products is 8, but the user needs to use only the
  143.  number of data columns less 1. For example if the data file includes 7
  144.  columns the first column is the dependent function and the rest 6 are
  145.  for the independent variables, therefore the user can fit a function
  146.  which is a product of 6 powers maximum. In our example we have only
  147.  two columns therefore we need to choose 1 power only.
  148.  
  149.  Press <L> to get the next prompt:
  150.  
  151.  Number of powers (Number of columns LESS ONE!, 8 max) - 1
  152.  
  153.  Since in this example we have only two columns type 1 and press ENTER.
  154.  
  155.  The program displays the regression curve fitting graphs as Log-Log 
  156.  graph (the data and the fitted curves, see LOG1.PIC). If you print 
  157.  this graph using Lotus PRINTGRAPH you will find that the log/power 
  158.  option doesn't fit so well.
  159.  
  160.  Press [ESC] to get the next screen:
  161.  
  162. ____________________________________________________________________________
  163.  
  164.  Import Poly. Log/power Exp. Multi_linear Data_save Graph_save  Help
  165.  Import data file (list) of numbers               [ESC] - Previous menu
  166.              A           B           C           D           E
  167.  1 ====================================================================
  168.  2          Units        |     Output/Input      |        Memory      |
  169.  3 ====================================================================
  170.  4   None                |                  0.00 |                0.00|
  171.  5 ====================================================================
  172.         FQ       FR       FS       FT       FU       FV       FW
  173.  3            Regression Output:
  174.  4   Constant                   0.661512
  175.  5   Std Err of Y Est           0.986340
  176.  6   R Squared                  0.905661
  177.  7   No. of Observations              10
  178.  8   Degrees of Freedom                8
  179.  9
  180.  10  X Coefficient(s)
  181.  11
  182.  12  3.930705
  183.  13
  184.  14  Std Err of Coef.
  185.  15
  186.  16  0.448525
  187. ____________________________________________________________________________
  188.  
  189.  
  190.  In this screen it can be seen that R Squared is far from 1, as the
  191.  R Squared gets closer to 1 the better the fit is.
  192.  
  193.  The fitted curve can be expressed as:
  194.  
  195.  LN(Y) = .661512 + 3.930705 * LN(X)
  196.  
  197.  and by representing the constant .661512 as LN(EXP(.661512)) we can
  198.  write:
  199.  
  200.  Y = EXP(.661512) * X^3.930705
  201.  
  202.  in case of more powers the function can be expressed as:
  203.  
  204.  Y = EXP(Constant) * X^coef1 * Y^coef2 *.....
  205.  
  206.  
  207.  4.3D <E>xponent
  208.  
  209.  
  210.  The program displays the regression curve fitting graphs as Log(Y) vs. 
  211.  X (the data and the fitted curves, see EXPONENT.PIC). If you print
  212.  this graph using Lotus PRINTGRAPH you will find that it fits well.
  213.  
  214.  Press [ESC] to view the next screen:
  215.  
  216. ____________________________________________________________________________
  217.  
  218.  Import Poly. Log/power Exp. Multi_linear Data_save Graph_save  Help
  219.  Import data file (list) of numbers               [ESC] - Previous menu
  220.              A           B           C           D           E
  221.  1 ====================================================================
  222.  2          Units        |     Output/Input      |        Memory      |
  223.  3 ====================================================================
  224.  4   None                |                  0.00 |                0.00|
  225.  5 ====================================================================
  226.         FQ       FR       FS       FT       FU       FV       FW
  227.  3            Regression Output:
  228.  4   Constant                   1.098612
  229.  5   Std Err of Y Est           0.000000
  230.  6   R Squared                         1
  231.  7   No. of Observations              10
  232.  8   Degrees of Freedom                8
  233.  9
  234.  10  X Coefficient(s)
  235.  11
  236.  12  1.000000
  237.  13
  238.  14  Std Err of Coef.
  239.  15
  240.  16  0.000000
  241. ____________________________________________________________________________
  242.  
  243.  
  244.  In this screen it can be seen that R Squared=1 therefore the curve is
  245.  well fitted.
  246.  
  247.  The fitted curve can be expressed as:
  248.  
  249.  LN(Y) = 1.098612 + 1 * X
  250.  
  251.  by representing the constant 1.098612 as LN(EXP(1.098612)) we can
  252.  write:
  253.  
  254.  Y = EXP(1.098612) * EXP(X^1)
  255.  
  256.  and in general terms:
  257.  
  258.  Y = EXP(constant) * EXP(X)
  259.  
  260.  
  261.  4.3E <M>ulti-linear
  262.  
  263.  
  264.  Press <m> to get the next prompt:
  265.  
  266.  Number of independent variables (Number of columns LESS ONE!,8max) - 1
  267.  
  268.  In this example we will try to fit a 1 variable linear function to the
  269.  data (because the imported file has only two columns). To see the 
  270.  results you can print the file (LINEAR.PIC).
  271.  
  272.  Type 1 and press ENTER to view the graph.
  273.  
  274.  Press [ESC] to get the next screen:
  275.  
  276. ____________________________________________________________________________
  277.  
  278.  Import Poly. Log/power Exp. Multi_linear Data_save Graph_save  Help
  279.  Import data file (list) of numbers               [ESC] - Previous menu
  280.              A           B           C           D           E
  281.  1 ====================================================================
  282.  2          Units        |     Output/Input      |        Memory      |
  283.  3 ====================================================================
  284.  4   None                |                  0.00 |                0.00|
  285.  5 ====================================================================
  286.         FQ       FR       FS       FT       FU       FV       FW
  287.  3            Regression Output:
  288.  4   Constant                   -16853.7
  289.  5   Std Err of Y Est           15506.45
  290.  6   R Squared                  0.513903
  291.  7   No. of Observations              10
  292.  8   Degrees of Freedom                8
  293.  9
  294.  10  X Coefficient(s)
  295.  11
  296.  12  4964.891
  297.  13
  298.  14  Std Err of Coef.
  299.  15
  300.  16  1707.204
  301. ____________________________________________________________________________
  302.  
  303.  
  304.  In this screen it can be seen that R Squared is far from 1 (we tried
  305.  to fit a linear function to data which describes an exponent), as R 
  306.  Squared get closer to 1 the better the fit is.
  307.  
  308.  The fitted curve can be expressed as:
  309.  
  310.  FUNC = Constant + coef1*X1 + coef2*X2 + .....
  311.